package com.runfig.wowo.cloud.advice;

import com.runfig.wowo.cloud.common.CommonExceptionAdvice;
import com.runfig.wowo.cloud.common.Result;
import com.runfig.wowo.cloud.util.MemberCodeMsg;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class MemberControllerAdvice extends CommonExceptionAdvice {
    @ExceptionHandler(Exception.class)
    @ResponseBody
    public Result handleDefaultException(Exception e){
        e.getMessage();
        return Result.error(MemberCodeMsg.DEFAULT_ERROR);
    }
}
